package com.example.aigc_education.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName kg_chat_conversation
 */
@TableName(value ="kg_chat_conversation")
@Data
public class KgChatConversation implements Serializable {
    /**
     * 会话ID
     */
    @TableId(value = "conv_id", type = IdType.AUTO)
    private Long convId;

    /**
     * 会话标题
     */
    @TableField(value = "conv_title")
    private String convTitle;

    /**
     * 会话描述
     */
    @TableField(value = "conv_desc")
    private String convDesc;

    /**
     * 会话状态（0已删除，1正常，2已归档）
     */
    @TableField(value = "conv_status")
    private Integer convStatus;

    /**
     * 会话类型（1伴学）
     */
    @TableField(value = "conv_type")
    private Integer convType;

    /**
     * 最后一次聊天时间
     */
    @TableField(value = "last_chat_time")
    private Date lastChatTime;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 创建者ID
     */
    @TableField(value = "create_by")
    private Long createBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 更新者ID
     */
    @TableField(value = "update_by")
    private Long updateBy;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        KgChatConversation other = (KgChatConversation) that;
        return (this.getConvId() == null ? other.getConvId() == null : this.getConvId().equals(other.getConvId()))
            && (this.getConvTitle() == null ? other.getConvTitle() == null : this.getConvTitle().equals(other.getConvTitle()))
            && (this.getConvDesc() == null ? other.getConvDesc() == null : this.getConvDesc().equals(other.getConvDesc()))
            && (this.getConvStatus() == null ? other.getConvStatus() == null : this.getConvStatus().equals(other.getConvStatus()))
            && (this.getConvType() == null ? other.getConvType() == null : this.getConvType().equals(other.getConvType()))
            && (this.getLastChatTime() == null ? other.getLastChatTime() == null : this.getLastChatTime().equals(other.getLastChatTime()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getConvId() == null) ? 0 : getConvId().hashCode());
        result = prime * result + ((getConvTitle() == null) ? 0 : getConvTitle().hashCode());
        result = prime * result + ((getConvDesc() == null) ? 0 : getConvDesc().hashCode());
        result = prime * result + ((getConvStatus() == null) ? 0 : getConvStatus().hashCode());
        result = prime * result + ((getConvType() == null) ? 0 : getConvType().hashCode());
        result = prime * result + ((getLastChatTime() == null) ? 0 : getLastChatTime().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", convId=").append(convId);
        sb.append(", convTitle=").append(convTitle);
        sb.append(", convDesc=").append(convDesc);
        sb.append(", convStatus=").append(convStatus);
        sb.append(", convType=").append(convType);
        sb.append(", lastChatTime=").append(lastChatTime);
        sb.append(", userId=").append(userId);
        sb.append(", createTime=").append(createTime);
        sb.append(", createBy=").append(createBy);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}